
. 
. 
. ************************Build trade data for 07-09******************************************
. 
. cd C:\NBB\Projects\ECB\
C:\NBB\Projects\ECB

. 
.         use Data\ixd_1_trim_2007.dta, clear

.         append using Data\ixd_2_trim_2007.dta

.         append using Data\ixd_1_trim_2008.dta

.         append using Data\ixd_2_trim_2008.dta

.         append using Data\ixd_1_trim_2009.dta

.         append using Data\ixd_2_trim_2009.dta

. 
. 
.         gen chow = 1 if  ///
>                          nature == "1" | nature == "11" | nature == "12" | nature == "13" | 
> nature == "14" | nature == "15" | nature == "16" | nature == "17" | ///
>                          nature == "18" | nature == "19"  | ///
>                          nature == "3" | nature == "31" | nature == "32" | nature == "33" | 
> nature == "34" | nature == "35" | nature == "36" | nature == "37" | ///
>                          nature == "38" | nature == "39"  | ///
>                          nature == "7" | nature == "71" | nature == "72" | nature == "73" | 
> nature == "74" | nature == "75" | nature == "76" | nature == "77" | ///
>                          nature == "78" | nature == "79"  | ///
>                          nature ==  "8" | nature ==  "81" | nature ==  "82" | nature ==  "83
> " | nature ==  "84" | nature ==  "85" | nature ==  "86" | ///
>                          nature == "87" | nature ==  "88" | nature ==  "89"
(985310 missing values generated)

.         
.         qui count if chow == 1

.         
.         *******keeping only those transactins involving changes in ownerships*****
.         keep if chow == 1 
(985310 observations deleted)

.         drop chow

.         ***********     
.         **Eliminating some unuseful codes 
.         
.         drop if  land == "EU" |land == "II" | land == "BE" |land == "XX" | land == "QQ" | la
> nd == "QU" | land =="QX" |  land =="QY" |  land =="QZ" | land =="XN" |  land =="XU" |  land 
> =="XV" |  land =="XW" |  land =="XS" |  land =="XR" |  land =="XQ" |  land =="XP" |  land ==
> "XO" |  land =="XT"   
(13163 observations deleted)

. 
.         *****************
.         
.         replace flow="EXP" if flow=="XE"
flow was str2 now str3
(884927 real changes made)

.         replace flow="EXP" if flow=="XI"
(2642240 real changes made)

.         replace flow="IMP" if flow=="IE"
(685980 real changes made)

.         replace flow="IMP" if flow=="II"
(3108494 real changes made)

. 
. 
.         ***drop trade by non residents********
. 
. 
.         sort vat year

.         merge vat year using Data\Non_residents_year_2007.dta
variables vat year do not uniquely identify observations in the master data
year was int now float

.         drop if _merge==2
(2773 observations deleted)

.         drop _merge

.         gen keep=1

.         replace keep=0 if resd!=""
(211922 real changes made)

.         drop  resd

. 
. 
.         sort vat year

.         merge vat year using Data\Non_residents_year_2008.dta
variables vat year do not uniquely identify observations in the master data

.         drop if _merge==2
(2830 observations deleted)

.         drop _merge

.         replace keep=0 if resd!=""
(241234 real changes made)

.         drop  resd

. 
.         sort vat year

.         merge vat year using Data\Non_residents_year_2009.dta
variables vat year do not uniquely identify observations in the master data

.         drop if _merge==2
(2948 observations deleted)

.         drop _merge

.         replace keep=0 if resd!=""
(252544 real changes made)

.         drop  resd

. 
.         keep if keep==1
(705700 observations deleted)

. 
. 
.         collapse (sum)  value , by( year vat flow) 

.         tostring year, generate(pippo)
pippo generated as str4

.         tostring vat, generate(pippa)
pippa generated as str9

.         egen fake=concat(pippo pippa)

.         drop vat year pippa pippo

.         reshape wide  value, i(fake) j(flow) string
(note: j = EXP IMP)

Data                               long   ->   wide
-----------------------------------------------------------------------------
Number of obs.                   144248   ->  110612
Number of variables                   3   ->       3
j variable (2 values)              flow   ->   (dropped)
xij variables:
                                  value   ->   valueEXP valueIMP
-----------------------------------------------------------------------------

.         gen year=substr(fake,1,4)

.         destring year, replace
year has all characters numeric; replaced as int

.         gen vat=substr(fake,5,9)

.         destring vat, replace
vat has all characters numeric; replaced as long

.         drop fake

.         order vat year

.         sort vat year

.         save trade_for_VAT.dta, replace
file trade_for_VAT.dta saved

. 
end of do-file

. do "C:\Users\Gio\AppData\Local\Temp\STD02000000.tmp"

.         use trade_for_VAT.dta, clear

.         merge  vat year using data\prodcom_firm_1st_semester.dta

. 
end of do-file

. tab _merge

     _merge |      Freq.     Percent        Cum.
------------+-----------------------------------
          1 |     99,042       81.96       81.96
          2 |     10,232        8.47       90.43
          3 |     11,570        9.57      100.00
------------+-----------------------------------
      Total |    120,844      100.00

. browse

. ta year

       year |      Freq.     Percent        Cum.
------------+-----------------------------------
       2006 |      6,307        5.22        5.22
       2007 |     34,741       28.75       33.97
       2008 |     38,967       32.25       66.21
       2009 |     40,829       33.79      100.00
------------+-----------------------------------
      Total |    120,844      100.00

. drop if _merge==2
(10232 observations deleted)

. tab year

       year |      Freq.     Percent        Cum.
------------+-----------------------------------
       2007 |     32,601       29.47       29.47
       2008 |     38,050       34.40       63.87
       2009 |     39,961       36.13      100.00
------------+-----------------------------------
      Total |    110,612      100.00

. do "C:\Users\Gio\AppData\Local\Temp\STD02000000.tmp"

.         use trade_for_VAT.dta, clear

.         merge  vat year using data\prodcom_firm_1st_semester.dta

.         drop if _merge==2
(10232 observations deleted)

.         drop _merge

.         sort vat year   

.         save temp.dta, replace
(note: file temp.dta not found)
file temp.dta saved

. 
.         use temp.dta, clear

.         keep if year==2007
(78011 observations deleted)

.         sort vat

.         merge vat using Data\firm_data_07_08.dta
variable vat does not uniquely identify observations in Data\firm_data_07_08.dta

.         drop if _merge==2
(8047 observations deleted)

.         drop _merge

.         save temp2.dta, replace
(note: file temp2.dta not found)
file temp2.dta saved

. 
. 
.         use temp.dta, clear

.         drop if year==2007
(32601 observations deleted)

.         sort vat

.         merge vat using Data\firm_data.dta
variable vat does not uniquely identify observations in the master data
variable vat does not uniquely identify observations in Data\firm_data.dta

.         drop if _merge==2
(2 observations deleted)

.         drop _merge

.         recode  r_*  for mne (1=.) if year==2009
(r_size: 12845 changes made)
(r_prod: 12495 changes made)
(r_ci: 12001 changes made)
(r_skill_i: 12547 changes made)
(r_share_exp_sales: 7243 changes made)
(r_share_imp_interm: 10830 changes made)
(r_value_add_chain: 5652 changes made)
(r_interm_share: 15421 changes made)
(r_share_debts_o_passive: 14988 changes made)
(r_share_debts_due_after_one: 15321 changes made)
(r_share_fin_debt: 15132 changes made)
(r_share_stock: 12192 changes made)
(r_ext_fin_dep: 12668 changes made)
(for: 1382 changes made)
(mne: 736 changes made)

.         recode  r_*  for mne (0=.) if year==2009
(r_size: 11454 changes made)
(r_prod: 11803 changes made)
(r_ci: 11938 changes made)
(r_skill_i: 11752 changes made)
(r_share_exp_sales: 23038 changes made)
(r_share_imp_interm: 19647 changes made)
(r_value_add_chain: 24629 changes made)
(r_interm_share: 14850 changes made)
(r_share_debts_o_passive: 15459 changes made)
(r_share_debts_due_after_one: 15127 changes made)
(r_share_fin_debt: 15156 changes made)
(r_share_stock: 12311 changes made)
(r_ext_fin_dep: 13337 changes made)
(for: 29391 changes made)
(mne: 30037 changes made)

.         replace nace2=. if year==2009
(30751 real changes made, 30751 to missing)

.         
.         append using temp2.dta

.         erase temp.dta

.         erase temp2.dta

. 
.         sort vat year

.         egen pippo=count(year), by(vat)

.         drop if  pippo==4 & r_size==.
(2 observations deleted)

.         xtset vat year
       panel variable:  vat (unbalanced)
        time variable:  year, 2007 to 2009, but with gaps
                delta:  1 unit

. 
end of do-file

. browse

. do "C:\Users\Gio\AppData\Local\Temp\STD02000000.tmp"

.         **********************Analysis****************************
.         **********************Analysis****************************
.         **********************Analysis****************************
.         use trade_for_VAT.dta, clear

.         merge  vat year using data\prodcom_firm_1st_semester.dta

.         drop if _merge==2
(10232 observations deleted)

.         drop _merge

.         sort vat year   

.         save temp.dta, replace
(note: file temp.dta not found)
file temp.dta saved

. 
.         use temp.dta, clear

.         keep if year==2007
(78011 observations deleted)

.         sort vat

.         merge vat using Data\firm_data_07_08.dta
variable vat does not uniquely identify observations in Data\firm_data_07_08.dta

.         drop if _merge==2
(8047 observations deleted)

.         drop _merge

.         save temp2.dta, replace
(note: file temp2.dta not found)
file temp2.dta saved

. 
. 
.         use temp.dta, clear

.         drop if year==2007
(32601 observations deleted)

.         sort vat

.         merge vat using Data\firm_data.dta
variable vat does not uniquely identify observations in the master data
variable vat does not uniquely identify observations in Data\firm_data.dta

.         drop if _merge==2
(2 observations deleted)

.         drop _merge

.         recode  r_*  for mne (1=.) if year==2009
(r_size: 12845 changes made)
(r_prod: 12495 changes made)
(r_ci: 12001 changes made)
(r_skill_i: 12547 changes made)
(r_share_exp_sales: 7243 changes made)
(r_share_imp_interm: 10830 changes made)
(r_value_add_chain: 5652 changes made)
(r_interm_share: 15421 changes made)
(r_share_debts_o_passive: 14988 changes made)
(r_share_debts_due_after_one: 15321 changes made)
(r_share_fin_debt: 15132 changes made)
(r_share_stock: 12192 changes made)
(r_ext_fin_dep: 12668 changes made)
(for: 1382 changes made)
(mne: 736 changes made)

.         recode  r_*  for mne (0=.) if year==2009
(r_size: 11454 changes made)
(r_prod: 11803 changes made)
(r_ci: 11938 changes made)
(r_skill_i: 11752 changes made)
(r_share_exp_sales: 23038 changes made)
(r_share_imp_interm: 19647 changes made)
(r_value_add_chain: 24629 changes made)
(r_interm_share: 14850 changes made)
(r_share_debts_o_passive: 15459 changes made)
(r_share_debts_due_after_one: 15127 changes made)
(r_share_fin_debt: 15156 changes made)
(r_share_stock: 12311 changes made)
(r_ext_fin_dep: 13337 changes made)
(for: 29391 changes made)
(mne: 30037 changes made)

.         replace nace2=. if year==2009
(30751 real changes made, 30751 to missing)

.         
.         append using temp2.dta

.         erase temp.dta

.         erase temp2.dta

. 
.         sort vat year

.         egen pippo=count(year), by(vat)

.         drop if  pippo==4 & r_size==.
(2 observations deleted)

.         xtset vat year
       panel variable:  vat (unbalanced)
        time variable:  year, 2007 to 2009, but with gaps
                delta:  1 unit

. 
. 
.         gen pippo_exp=log(valueEXP/prod_value)
(101654 missing values generated)

. 
.         gen ratio_exp=f1.pippo_exp-pippo_exp 
(105326 missing values generated)

.         gen pippi_exp=0

.         replace pippi_exp=1 if (r_size + r_prod + r_interm_share + r_share_exp_sales + r_sha
> re_imp_interm + r_value_add_chain +  r_ext_fin_dep + r_share_debts_o_passive + r_share_debts
> _due_after_one + r_share_fin_debt + r_share_stock + for + mne + nace2 +  ratio_exp) != .
(5012 real changes made)

. 
.         su ratio_exp if  pippi_exp==1 &  ratio_exp!=. & year==2007, de

                          ratio_exp
-------------------------------------------------------------
      Percentiles      Smallest
 1%    -2.657718      -8.621041
 5%    -.8109331      -8.329722
10%    -.4342272      -7.755792       Obs                2520
25%    -.1205498      -5.273272       Sum of Wgt.        2520

50%    -.0030951                      Mean           .0101397
                        Largest       Std. Dev.       .856245
75%     .1164825       6.420945
90%     .3839202        6.44953       Variance       .7331555
95%     .8888946       6.509768       Skewness        .235401
99%     3.170824       6.684512       Kurtosis       28.49337

.         su ratio_exp if  pippi_exp==1 &  ratio_exp!=. & year==2008, de

                          ratio_exp
-------------------------------------------------------------
      Percentiles      Smallest
 1%    -2.851451      -7.099237
 5%    -1.031492      -6.876334
10%    -.4998311      -5.709157       Obs                2492
25%    -.1680074      -5.445644       Sum of Wgt.        2492

50%    -.0098324                      Mean          -.0168708
                        Largest       Std. Dev.       .900533
75%     .1121358       6.633713
90%     .4188347       7.422523       Variance       .8109598
95%     .8578326       7.585882       Skewness       .9202412
99%     3.237922       8.786479       Kurtosis       26.56388

.         su pippo_exp if  pippi_exp==1 &  ratio_exp!=. & year==2007, de

                          pippo_exp
-------------------------------------------------------------
      Percentiles      Smallest
 1%    -7.314717      -8.627328
 5%      -4.4085      -8.269543
10%    -2.698676      -8.261008       Obs                2520
25%    -1.251467      -8.063302       Sum of Wgt.        2520

50%    -.4688852                      Mean          -.9274102
                        Largest       Std. Dev.       1.56875
75%    -.0965043       4.691522
90%     .1186558       4.772216       Variance       2.460976
95%     .4618958       5.884898       Skewness      -1.879463
99%     1.867884       6.323571       Kurtosis       8.633008

.         su pippo_exp if  l1.pippi_exp==1 &  l1.ratio_exp!=. & year==2008, de

                          pippo_exp
-------------------------------------------------------------
      Percentiles      Smallest
 1%    -7.103626      -10.89845
 5%    -4.303376      -9.932854
10%    -2.676398      -9.862098       Obs                2520
25%    -1.246756      -9.241843       Sum of Wgt.        2520

50%    -.4630606                      Mean          -.9172705
                        Largest       Std. Dev.      1.599434
75%    -.1009886       4.827064
90%     .1295191       5.293633       Variance       2.558188
95%     .4636186       6.674086       Skewness      -1.784235
99%      2.24977        10.2634       Kurtosis       10.22233

.         su pippo_exp if  pippi_exp==1 &  ratio_exp!=. & year==2008, de

                          pippo_exp
-------------------------------------------------------------
      Percentiles      Smallest
 1%    -7.335227      -10.89845
 5%    -4.396612      -9.535789
10%    -2.756826      -9.493708       Obs                2492
25%    -1.294362      -9.150368       Sum of Wgt.        2492

50%    -.4786644                      Mean          -.9536777
                        Largest       Std. Dev.       1.64401
75%    -.1069607       4.827064
90%     .1285725       5.293633       Variance        2.70277
95%     .4519003       6.674086       Skewness      -1.817433
99%     2.210613        10.2634       Kurtosis       9.866928

.         su pippo_exp if  l1.pippi_exp==1 &  l1.ratio_exp!=. & year==2009, de

                          pippo_exp
-------------------------------------------------------------
      Percentiles      Smallest
 1%    -7.587969      -10.92116
 5%    -4.542293      -10.75706
10%    -2.723535      -9.756413       Obs                2492
25%    -1.314267      -9.506833       Sum of Wgt.        2492

50%    -.5268058                      Mean          -.9705485
                        Largest       Std. Dev.        1.6622
75%    -.1057158       5.342516
90%     .1492462       5.755699       Variance        2.76291
95%     .5376144       6.371718       Skewness      -1.882858
99%     2.164471       6.767781       Kurtosis       9.470255

.         corr pippo_exp f1.pippo_exp if pippi_exp==1 &  ratio_exp!=. & year==2007
(obs=2520)

             |                 F.
             | pippo_~p pippo_~p
-------------+------------------
   pippo_exp |
         --. |   1.0000
         F1. |   0.8541   1.0000


.         corr pippo_exp f1.pippo_exp if pippi_exp==1 &  ratio_exp!=. & year==2008
(obs=2492)

             |                 F.
             | pippo_~p pippo_~p
-------------+------------------
   pippo_exp |
         --. |   1.0000
         F1. |   0.8517   1.0000


. 
. 
.         gen pippo_imp=log(valueIMP/  prod_value)
(100163 missing values generated)

. 
.         gen ratio_imp=f1.pippo_imp-pippo_imp 
(104352 missing values generated)

.         gen pippi_imp=0

.         replace pippi_imp=1 if (r_size + r_prod + r_interm_share + r_share_exp_sales + r_sha
> re_imp_interm + r_value_add_chain +  r_ext_fin_dep + r_share_debts_o_passive + r_share_debts
> _due_after_one + r_share_fin_debt + r_share_stock + for + mne + nace2 +  ratio_imp) != .
(5939 real changes made)

. 
.         su ratio_imp if  pippi_imp==1 &  ratio_imp!=. & year==2007, de

                          ratio_imp
-------------------------------------------------------------
      Percentiles      Smallest
 1%    -2.661717      -11.15801
 5%    -1.024538      -9.809155
10%    -.5825607      -6.888761       Obs                2986
25%    -.2251045      -5.865613       Sum of Wgt.        2986

50%    -.0064121                      Mean          -.0391279
                        Largest       Std. Dev.      .7889575
75%     .2059282       4.876534
90%     .4869414       4.961702       Variance        .622454
95%     .8132349       5.079049       Skewness      -1.960793
99%     2.286494       5.815325       Kurtosis       36.49505

.         su ratio_imp if  pippi_imp==1 &  ratio_imp!=. & year==2008, de

                          ratio_imp
-------------------------------------------------------------
      Percentiles      Smallest
 1%    -2.742817      -6.127385
 5%    -1.128146      -5.931267
10%    -.7422105      -5.902497       Obs                2953
25%    -.3464245      -5.251949       Sum of Wgt.        2953

50%    -.0880199                      Mean          -.1079564
                        Largest       Std. Dev.      .8142687
75%     .1394711        5.93584
90%      .484483       6.105953       Variance       .6630335
95%     .8575978       6.463287       Skewness       .6361607
99%     2.524935       8.206594       Kurtosis       21.45934

.         su pippo_imp if  pippi_imp==1 &  ratio_imp!=. & year==2007, de

                          pippo_imp
-------------------------------------------------------------
      Percentiles      Smallest
 1%     -6.33003      -9.225578
 5%    -3.421642      -7.854888
10%    -2.727737      -7.668813       Obs                2986
25%     -1.90117       -7.63531       Sum of Wgt.        2986

50%    -1.256583                      Mean          -1.360927
                        Largest       Std. Dev.      1.298329
75%    -.7004949       4.059958
90%    -.1888365       4.466588       Variance       1.685659
95%     .2990072       5.128798       Skewness      -.7227493
99%     2.207893       5.906135       Kurtosis       8.297955

.         su pippo_imp if  l1.pippi_imp==1 &  l1.ratio_imp!=. & year==2008, de

                          pippo_imp
-------------------------------------------------------------
      Percentiles      Smallest
 1%    -6.528187      -11.76561
 5%    -3.648393      -11.41912
10%    -2.799688      -11.30041       Obs                2986
25%    -1.930142      -10.73688       Sum of Wgt.        2986

50%    -1.242321                      Mean          -1.400055
                        Largest       Std. Dev.      1.404144
75%    -.7040636       4.586456
90%    -.2225945        5.03739       Variance       1.971621
95%     .3638928       5.582846       Skewness      -1.262692
99%       2.1982       6.387502       Kurtosis       11.42298

.         su pippo_imp if  pippi_imp==1 &  ratio_imp!=. & year==2008, de

                          pippo_imp
-------------------------------------------------------------
      Percentiles      Smallest
 1%    -6.692048      -11.41912
 5%    -3.582494      -11.30041
10%    -2.799358      -10.80683       Obs                2953
25%    -1.938664      -10.40926       Sum of Wgt.        2953

50%    -1.253825                      Mean          -1.414346
                        Largest       Std. Dev.      1.418691
75%    -.7166076       4.586456
90%     -.233318        5.03739       Variance       2.012684
95%     .3424349       5.582846       Skewness      -1.452065
99%     2.174194       6.387502       Kurtosis       12.12354

.         su pippo_imp if  l1.pippi_imp==1 &  l1.ratio_imp!=. & year==2009, de

                          pippo_imp
-------------------------------------------------------------
      Percentiles      Smallest
 1%    -7.196384      -12.02114
 5%    -3.910529      -11.45938
10%    -2.964182      -10.45634       Obs                2953
25%    -2.072062      -10.08025       Sum of Wgt.        2953

50%    -1.381217                      Mean          -1.522303
                        Largest       Std. Dev.      1.475313
75%     -.797344       4.710558
90%    -.2723543       5.391747       Variance       2.176548
95%      .379284       6.083367       Skewness      -1.211178
99%     2.216309        6.39159       Kurtosis       10.56476

.         corr pippo_imp f1.pippo_imp if pippi_imp==1 &  ratio_imp!=. & year==2007
(obs=2986)

             |                 F.
             | pippo~mp pippo~mp
-------------+------------------
   pippo_imp |
         --. |   1.0000
         F1. |   0.8324   1.0000


.         corr pippo_imp f1.pippo_imp if pippi_imp==1 &  ratio_imp!=. & year==2008
(obs=2953)

             |                 F.
             | pippo~mp pippo~mp
-------------+------------------
   pippo_imp |
         --. |   1.0000
         F1. |   0.8424   1.0000


. 
end of do-file

. do "C:\Users\Gio\AppData\Local\Temp\STD02000000.tmp"

.         xi i.nace2, pre(nace)
i.nace2           nacenace2_1-99      (naturally coded; nacenace2_1 omitted)

.         gen  nacenace2_1=0

.         replace  nacenace2_1=1 if nace2==1
(616 real changes made)

.         drop nacenace2_34

. *       we take automobile as reference
. 
. 
.         gen crisis=.
(110612 missing values generated)

.         replace crisis=0 if year==2007
(32601 real changes made)

.         replace crisis=1 if year==2008
(38050 real changes made)

. 
.         generate is_nace2=nace2*crisis
(57694 missing values generated)

. 
.         generate i_r_size=r_size*crisis
(67355 missing values generated)

.         generate i_r_prod=r_prod*crisis
(67357 missing values generated)

.         generate i_r_interm_share=r_interm_share*crisis
(58095 missing values generated)

.         generate i_r_share_exp_sales=r_share_exp_sales*crisis
(58086 missing values generated)

.         generate i_r_share_imp_interm=r_share_imp_interm*crisis
(57886 missing values generated)

.         generate i_r_value_add_chain=r_value_add_chain*crisis
(58086 missing values generated)

.         generate i_r_ext_fin_dep=r_ext_fin_dep*crisis
(64962 missing values generated)

.         generate i_r_share_debts_o_passive=r_share_debts_o_passive*crisis
(58163 missing values generated)

.         generate i_r_share_debts_due_after_one=r_share_debts_due_after_one*crisis
(58162 missing values generated)

.         generate i_r_share_fin_debt=r_share_fin_debt*crisis
(58347 missing values generated)

.         generate i_r_share_stock=r_share_stock*crisis
(66247 missing values generated)

.         generate i_for=for*crisis
(57682 missing values generated)

.         generate i_mne=mne*crisis
(57682 missing values generated)

.         
. 
.         xi i.is_nace2, pre(is_n)
i.is_nace2        is_nis_nace_0-99    (naturally coded; is_nis_nace_0 omitted)

.         drop  is_nis_nace_34

.         *we take automobile as reference
. 
.         local instruct "tex tdec(4) rdec(4) auto(4) bdec (4) symbol($^a$,$^b$,$^c$)  se"

.         local firm_var " r_size r_prod  r_interm_share  r_share_exp_sales  r_share_imp_inter
> m r_value_add_chain r_ext_fin_dep r_share_debts_o_passive r_share_debts_due_after_one r_shar
> e_fin_debt r_share_stock for mne"

.         local inter "i_*"

.         local dummies "  nacenace2_*  is_nis_nace_*"

. 
. 
.         xi: regress  ratio_exp crisis `firm_var' `inter' `dummies' , cluster(vat)

Linear regression                                      Number of obs =    5012
                                                       F( 90,  2634) =       .
                                                       Prob > F      =       .
                                                       R-squared     =  0.0255
                                                       Root MSE      =  .87597

                                 (Std. Err. adjusted for 2635 clusters in vat)
------------------------------------------------------------------------------
             |               Robust
   ratio_exp |      Coef.   Std. Err.      t    P>|t|     [95% Conf. Interval]
-------------+----------------------------------------------------------------
      crisis |  -.2021328   .2015736    -1.00   0.316    -.5973914    .1931259
      r_size |  -.0636007   .0604808    -1.05   0.293    -.1821954    .0549941
      r_prod |  -.0255686   .0413972    -0.62   0.537     -.106743    .0556057
r_interm_s~e |   .0646541   .0356288     1.81   0.070    -.0052092    .1345173
r_share_ex~s |  -.1142079   .0420836    -2.71   0.007    -.1967282   -.0316876
r_share_im~m |   .0338809    .037365     0.91   0.365    -.0393869    .1071487
r_value_ad~n |  -.0947258   .0459305    -2.06   0.039    -.1847894   -.0046623
r_ext_fin_~p |  -.0260656   .0400152    -0.65   0.515      -.10453    .0523987
r_share_d~ve |  -.0283248   .0374561    -0.76   0.450    -.1017711    .0451215
r_share_d~ne |   .0132549   .0386486     0.34   0.732    -.0625299    .0890396
r_share_fi~t |  -.0193423   .0395759    -0.49   0.625    -.0969452    .0582607
r_share_st~k |   .0170066   .0353948     0.48   0.631    -.0523978    .0864111
         for |   .0327857   .0397413     0.82   0.409    -.0451417    .1107131
         mne |   .0243288   .0360589     0.67   0.500    -.0463779    .0950355
    i_r_size |   .2204091   .0879279     2.51   0.012     .0479943    .3928238
    i_r_prod |   .0444228   .0604536     0.73   0.463    -.0741186    .1629642
i_r_interm~e |  -.0309232   .0550739    -0.56   0.575    -.1389157    .0770692
i_r_share_~s |   .0999147   .0688129     1.45   0.147    -.0350182    .2348475
i_r_share_~m |   .0339594   .0627127     0.54   0.588    -.0890118    .1569305
i_r_value_~n |  -.0763361   .0737954    -1.03   0.301    -.2210388    .0683667
i_r_ext_fi~p |  -.0557351   .0602365    -0.93   0.355    -.1738508    .0623806
i_r_share~ve |   .0394147   .0585306     0.67   0.501    -.0753558    .1541853
i_r_share~ne |    .073156   .0609899     1.20   0.230    -.0464369     .192749
i_r_share_~t |  -.0011436   .0618385    -0.02   0.985    -.1224004    .1201133
i_r_share_~k |   .0164293   .0572356     0.29   0.774    -.0958019    .1286605
       i_for |   .0127109   .0599689     0.21   0.832    -.1048801    .1303019
       i_mne |   -.116687   .0661448    -1.76   0.078    -.2463879     .013014
 nacenace2_2 |    1.93648     .11009    17.59   0.000     1.720608    2.152352
 nacenace2_5 |  (dropped)
nacenace2_11 |  (dropped)
nacenace2_14 |   .0178269   .0999067     0.18   0.858    -.1780767    .2137305
nacenace2_15 |   .0951515   .1007388     0.94   0.345    -.1023837    .2926867
nacenace2_16 |    .124267   .1128347     1.10   0.271    -.0969866    .3455207
nacenace2_17 |   .0384005    .101207     0.38   0.704    -.1600527    .2368537
nacenace2_18 |   .6572081   .2968805     2.21   0.027     .0750655    1.239351
nacenace2_19 |   .0509571   .1150124     0.44   0.658    -.1745666    .2764808
nacenace2_20 |   .1679015   .1451553     1.16   0.247    -.1167285    .4525314
nacenace2_21 |   .0540918   .0961791     0.56   0.574    -.1345023     .242686
nacenace2_22 |   .0119188   .1445956     0.08   0.934    -.2716136    .2954512
nacenace2_23 |   .1620805   .1453075     1.12   0.265    -.1228479     .447009
nacenace2_24 |   .0718648   .0988086     0.73   0.467    -.1218856    .2656152
nacenace2_25 |   .1528194   .1164156     1.31   0.189    -.0754559    .3810946
nacenace2_26 |   .0969213   .1347287     0.72   0.472    -.1672634     .361106
nacenace2_27 |   .1456497   .1219762     1.19   0.233    -.0935292    .3848285
nacenace2_28 |    .095945   .1136483     0.84   0.399    -.1269039    .3187939
nacenace2_29 |   .0224997   .1282858     0.18   0.861    -.2290514    .2740508
nacenace2_30 |  -.0952742   .1971588    -0.48   0.629     -.481876    .2913276
nacenace2_31 |   .0953876   .1405755     0.68   0.497    -.1802621    .3710372
nacenace2_32 |   .0140426   .1244516     0.11   0.910    -.2299903    .2580754
nacenace2_33 |   .2307095   .1485456     1.55   0.121    -.0605684    .5219874
nacenace2_35 |   .0254444    .189424     0.13   0.893    -.3459905    .3968792
nacenace2_36 |   .1525828   .1320426     1.16   0.248    -.1063349    .4115005
nacenace2_37 |   .1200172   .0954599     1.26   0.209    -.0671668    .3072012
nacenace2_40 |  (dropped)
nacenace2_41 |  (dropped)
nacenace2_45 |  -.0379702   .1731891    -0.22   0.826    -.3775707    .3016303
nacenace2_50 |  -.0828225   .2153818    -0.38   0.701    -.5051571    .3395121
nacenace2_51 |   .2107115   .1030663     2.04   0.041     .0086123    .4128106
nacenace2_52 |   .0189949   .1903862     0.10   0.921    -.3543266    .3923165
nacenace2_55 |    .242567   .1057335     2.29   0.022      .035238    .4498961
nacenace2_60 |  -.0964415   .3501981    -0.28   0.783    -.7831328    .5902498
nacenace2_61 |  (dropped)
nacenace2_62 |  (dropped)
nacenace2_63 |  -1.731053    1.31892    -1.31   0.189    -4.317277     .855172
nacenace2_64 |   .3502755   .1265441     2.77   0.006     .1021397    .5984114
nacenace2_65 |  (dropped)
nacenace2_66 |  (dropped)
nacenace2_67 |  (dropped)
nacenace2_70 |  (dropped)
nacenace2_71 |  (dropped)
nacenace2_72 |   .7575219   .7691032     0.98   0.325    -.7505858    2.265629
nacenace2_73 |  -.4505933   .1078249    -4.18   0.000    -.6620235   -.2391632
nacenace2_74 |   .1705618   .1515883     1.13   0.261    -.1266823    .4678059
nacenace2_80 |  (dropped)
nacenace2_85 |  (dropped)
nacenace2_90 |  (dropped)
nacenace2_91 |  (dropped)
nacenace2_92 |  (dropped)
nacenace2_93 |  (dropped)
nacenace2_99 |  (dropped)
 nacenace2_1 |  -.0770036   .1591407    -0.48   0.629    -.3890571    .2350499
is_nis_na~_1 |  -.1864503   .2249294    -0.83   0.407    -.6275066    .2546059
is_nis_na~_2 |  -1.343802   .1890111    -7.11   0.000    -1.714428    -.973177
is_nis_na~_5 |  (dropped)
is_nis_na~11 |  (dropped)
is_nis_na~14 |   -.075056   .1916419    -0.39   0.695    -.4508399    .3007278
is_nis_na~15 |  -.0721969   .1757411    -0.41   0.681    -.4168016    .2724078
is_nis_na~16 |   .0522953    .206357     0.25   0.800     -.352343    .4569337
is_nis_na~17 |  -.0552923   .1754457    -0.32   0.753    -.3993177    .2887331
is_nis_na~18 |  -.4843884   .3883898    -1.25   0.212    -1.245968    .2771915
is_nis_na~19 |   .1464805   .2371448     0.62   0.537    -.3185285    .6114895
is_nis_na~20 |  -.2963151   .2228856    -1.33   0.184    -.7333636    .1407334
is_nis_na~21 |  -.0215534    .189269    -0.11   0.909    -.3926844    .3495776
is_nis_na~22 |  -.1453411   .2398581    -0.61   0.545    -.6156704    .3249882
is_nis_na~23 |  -.2791459   .2477642    -1.13   0.260    -.7649779    .2066862
is_nis_na~24 |   .0090087   .1669943     0.05   0.957    -.3184446    .3364621
is_nis_na~25 |  -.0632504   .1858273    -0.34   0.734    -.4276326    .3011317
is_nis_na~26 |  -.1366315   .1957468    -0.70   0.485    -.5204646    .2472017
is_nis_na~27 |  -.1683497    .219076    -0.77   0.442    -.5979281    .2612288
is_nis_na~28 |  -.1083577   .2010398    -0.54   0.590    -.5025695    .2858542
is_nis_na~29 |   .0641519   .2154776     0.30   0.766    -.3583707    .4866744
is_nis_na~30 |  -.2232635   .2998987    -0.74   0.457    -.8113242    .3647973
is_nis_na~31 |  -.1766723   .2293125    -0.77   0.441    -.6263231    .2729786
is_nis_na~32 |   .5892758   .4105484     1.44   0.151    -.2157542    1.394306
is_nis_na~33 |   -.582251    .296218    -1.97   0.049    -1.163095   -.0014075
is_nis_na~35 |   .1729096   .3201843     0.54   0.589    -.4549285    .8007477
is_nis_na~36 |  -.1009679   .2076877    -0.49   0.627    -.5082154    .3062796
is_nis_na~37 |   -.353693   .2493726    -1.42   0.156     -.842679    .1352929
is_nis_na~40 |  (dropped)
is_nis_na~41 |  (dropped)
is_nis_na~45 |  -.0606741   .2673494    -0.23   0.820    -.5849102     .463562
is_nis_na~50 |   .3121543   .2889234     1.08   0.280    -.2543856    .8786941
is_nis_na~51 |  -.2129882   .1825068    -1.17   0.243    -.5708595    .1448831
is_nis_na~52 |     .15887   .3618203     0.44   0.661    -.5506108    .8683508
is_nis_na~55 |    -.19622   .3354951    -0.58   0.559    -.8540806    .4616406
is_nis_na~60 |   .2539353   .3372456     0.75   0.452    -.4073577    .9152283
is_nis_na~61 |  (dropped)
is_nis_na~62 |  (dropped)
is_nis_na~63 |   1.684389   1.327981     1.27   0.205    -.9196021    4.288379
is_nis_na~64 |  -.4754758   .2075176    -2.29   0.022    -.8823897   -.0685619
is_nis_na~65 |  (dropped)
is_nis_na~66 |  (dropped)
is_nis_na~67 |  (dropped)
is_nis_na~70 |  (dropped)
is_nis_na~71 |  (dropped)
is_nis_na~72 |  -1.342299    1.56333    -0.86   0.391    -4.407779     1.72318
is_nis_na~73 |   .7013067   .1815713     3.86   0.000       .34527    1.057343
is_nis_na~74 |  -.0467083   .2707906    -0.17   0.863    -.5776921    .4842756
is_nis_na~80 |  (dropped)
is_nis_na~85 |  (dropped)
is_nis_na~90 |  (dropped)
is_nis_na~91 |  (dropped)
is_nis_na~92 |  (dropped)
is_nis_na~93 |  (dropped)
is_nis_na~99 |  (dropped)
       _cons |   .0724199   .1301833     0.56   0.578    -.1828519    .3276918
------------------------------------------------------------------------------

.         outreg2 `firm_var' `inter' `dummies' using Results/table_PROD_DD.xls,ctitle(exports)
>   `instruct' replace
Results/table_PROD_DD.tex
Results/table_PROD_DD.xls
dir : seeout

.         xi: regress  ratio_imp crisis `firm_var' `inter' `dummies' , cluster(vat)

Linear regression                                      Number of obs =    5939
                                                       F( 92,  3117) =       .
                                                       Prob > F      =       .
                                                       R-squared     =  0.0322
                                                       Root MSE      =  .79609

                                 (Std. Err. adjusted for 3118 clusters in vat)
------------------------------------------------------------------------------
             |               Robust
   ratio_imp |      Coef.   Std. Err.      t    P>|t|     [95% Conf. Interval]
-------------+----------------------------------------------------------------
      crisis |  -.1663856   .1442939    -1.15   0.249    -.4493064    .1165352
      r_size |   .1526228   .0512487     2.98   0.003     .0521382    .2531074
      r_prod |   .0310013    .031882     0.97   0.331    -.0315106    .0935131
r_interm_s~e |   -.063165   .0300645    -2.10   0.036    -.1221131   -.0042168
r_share_ex~s |   .0367049   .0422636     0.87   0.385    -.0461623    .1195721
r_share_im~m |   .0352313   .0271463     1.30   0.194    -.0179952    .0884578
r_value_ad~n |   .0242491   .0457482     0.53   0.596    -.0654505    .1139486
r_ext_fin_~p |   .0280311   .0317809     0.88   0.378    -.0342826    .0903448
r_share_d~ve |  -.0227474   .0312879    -0.73   0.467    -.0840943    .0385995
r_share_d~ne |   .0500015   .0345849     1.45   0.148    -.0178101     .117813
r_share_fi~t |  -.0271441   .0338956    -0.80   0.423     -.093604    .0393158
r_share_st~k |  -.0463759   .0299818    -1.55   0.122     -.105162    .0124102
         for |  -.0443528   .0351681    -1.26   0.207    -.1133078    .0246022
         mne |   .0007968   .0311142     0.03   0.980    -.0602096    .0618033
    i_r_size |  -.1888927   .0833771    -2.27   0.024    -.3523724   -.0254131
    i_r_prod |  -.0139512   .0492215    -0.28   0.777     -.110461    .0825587
i_r_interm~e |   .0877946   .0471189     1.86   0.063    -.0045926    .1801818
i_r_share_~s |  -.0120385   .0664765    -0.18   0.856    -.1423806    .1183036
i_r_share_~m |  -.0807216   .0451265    -1.79   0.074    -.1692024    .0077591
i_r_value_~n |   -.035732   .0698807    -0.51   0.609    -.1727489    .1012849
i_r_ext_fi~p |  -.0622079   .0480631    -1.29   0.196    -.1564465    .0320307
i_r_share~ve |  -.0406439   .0491364    -0.83   0.408    -.1369868     .055699
i_r_share~ne |  -.0287485    .054146    -0.53   0.595    -.1349141     .077417
i_r_share_~t |   .0353917   .0545485     0.65   0.517     -.071563    .1423463
i_r_share_~k |    .045781    .046315     0.99   0.323    -.0450299     .136592
       i_for |   .1115352   .0574073     1.94   0.052    -.0010248    .2240953
       i_mne |   -.049555   .0552008    -0.90   0.369    -.1577887    .0586786
 nacenace2_2 |   2.209096   .0672389    32.85   0.000     2.077259    2.340933
 nacenace2_5 |  (dropped)
nacenace2_11 |  (dropped)
nacenace2_14 |   .1550345   .2391918     0.65   0.517    -.3139549    .6240239
nacenace2_15 |   -.086085   .0638845    -1.35   0.178     -.211345    .0391749
nacenace2_16 |  -.1465488   .1497114    -0.98   0.328    -.4400916    .1469941
nacenace2_17 |  -.1265172   .0859398    -1.47   0.141    -.2950215    .0419871
nacenace2_18 |   .0678409   .1683507     0.40   0.687    -.2622486    .3979304
nacenace2_19 |  -.2971196   .1018387    -2.92   0.004    -.4967974   -.0974419
nacenace2_20 |  -.1015254   .0731921    -1.39   0.166     -.245035    .0419841
nacenace2_21 |  -.0594135   .0689683    -0.86   0.389    -.1946415    .0758145
nacenace2_22 |  -.1147756    .108926    -1.05   0.292    -.3283495    .0987983
nacenace2_23 |   .1650182   .0743937     2.22   0.027     .0191526    .3108839
nacenace2_24 |  -.1014112   .0811669    -1.25   0.212    -.2605571    .0577347
nacenace2_25 |  -.1165618   .0688091    -1.69   0.090    -.2514776     .018354
nacenace2_26 |  -.0946674   .0705627    -1.34   0.180    -.2330215    .0436868
nacenace2_27 |  -.0754292   .0868376    -0.87   0.385    -.2456938    .0948354
nacenace2_28 |  -.1939325   .0690419    -2.81   0.005    -.3293047   -.0585603
nacenace2_29 |  -.1632639   .0818036    -2.00   0.046    -.3236583   -.0028695
nacenace2_30 |  -.1628238   .1811061    -0.90   0.369    -.5179232    .1922756
nacenace2_31 |  -.0979203   .1060298    -0.92   0.356    -.3058156     .109975
nacenace2_32 |  -.2921207   .0914779    -3.19   0.001    -.4714836   -.1127577
nacenace2_33 |  -.3536323   .1624654    -2.18   0.030    -.6721824   -.0350822
nacenace2_35 |  -.1339586   .1370867    -0.98   0.329     -.402748    .1348307
nacenace2_36 |  -.1944034   .0852839    -2.28   0.023    -.3616218   -.0271851
nacenace2_37 |  -.6782588    .347173    -1.95   0.051     -1.35897     .002452
nacenace2_40 |  (dropped)
nacenace2_41 |  (dropped)
nacenace2_45 |  -.2919191   .1524565    -1.91   0.056    -.5908444    .0070062
nacenace2_50 |   .4495127   .7190976     0.63   0.532    -.9604403    1.859466
nacenace2_51 |  -.1738221   .0714424    -2.43   0.015    -.3139009   -.0337432
nacenace2_52 |  -.2158461   .1424358    -1.52   0.130    -.4951235    .0634314
nacenace2_55 |  -.0697822   .1024326    -0.68   0.496    -.2706243    .1310599
nacenace2_60 |  -.3873454   .1423171    -2.72   0.007    -.6663902   -.1083007
nacenace2_61 |  (dropped)
nacenace2_62 |  (dropped)
nacenace2_63 |  -.1725608   .0701393    -2.46   0.014    -.3100846    -.035037
nacenace2_64 |  -.9338296   .0738832   -12.64   0.000    -1.078694   -.7889649
nacenace2_65 |  (dropped)
nacenace2_66 |  (dropped)
nacenace2_67 |  (dropped)
nacenace2_70 |  (dropped)
nacenace2_71 |  (dropped)
nacenace2_72 |   .0539988    .252307     0.21   0.831     -.440706    .5487036
nacenace2_73 |  -3.663521    .077679   -47.16   0.000    -3.815828   -3.511213
nacenace2_74 |  -.3808059   .2069232    -1.84   0.066    -.7865254    .0249136
nacenace2_80 |  (dropped)
nacenace2_85 |  (dropped)
nacenace2_90 |  -.1520835   .0741832    -2.05   0.040    -.2975365   -.0066305
nacenace2_91 |  (dropped)
nacenace2_92 |  (dropped)
nacenace2_93 |  (dropped)
nacenace2_99 |  (dropped)
 nacenace2_1 |  -.1939127   .2721656    -0.71   0.476    -.7275547    .3397292
is_nis_na~_1 |   .3244078   .3369355     0.96   0.336    -.3362301    .9850457
is_nis_na~_2 |  -1.151043   .1360568    -8.46   0.000    -1.417813   -.8842728
is_nis_na~_5 |  (dropped)
is_nis_na~11 |  (dropped)
is_nis_na~14 |   .1355756   .4406749     0.31   0.758     -.728467    .9996181
is_nis_na~15 |   .2837606   .1238107     2.29   0.022     .0410019    .5265194
is_nis_na~16 |   .5487458   .2227299     2.46   0.014     .1120336    .9854581
is_nis_na~17 |    .311463   .1558307     2.00   0.046     .0059218    .6170043
is_nis_na~18 |   .5881903   .2621804     2.24   0.025     .0741266    1.102254
is_nis_na~19 |   .5301126   .1528403     3.47   0.001     .2304348    .8297903
is_nis_na~20 |   .1995631   .1469213     1.36   0.174    -.0885092    .4876353
is_nis_na~21 |   .1243978   .1289179     0.96   0.335    -.1283749    .3771704
is_nis_na~22 |   .2943725   .1906685     1.54   0.123    -.0794762    .6682211
is_nis_na~23 |   -.081597   .1415757    -0.58   0.564     -.359188    .1959941
is_nis_na~24 |   .2833869   .1496209     1.89   0.058    -.0099787    .5767524
is_nis_na~25 |   .2004749   .1267744     1.58   0.114    -.0480949    .4490447
is_nis_na~26 |     .11949   .1358012     0.88   0.379    -.1467789    .3857588
is_nis_na~27 |   .2494714    .186006     1.34   0.180    -.1152352    .6141781
is_nis_na~28 |   .2535461   .1311938     1.93   0.053    -.0036888    .5107811
is_nis_na~29 |   .3891402   .1491128     2.61   0.009      .096771    .6815093
is_nis_na~30 |   .3374041   .4285558     0.79   0.431    -.5028762    1.177684
is_nis_na~31 |   .3755115   .1693734     2.22   0.027     .0434167    .7076063
is_nis_na~32 |   .8114473    .190107     4.27   0.000     .4386997    1.184195
is_nis_na~33 |   .9665183    .313336     3.08   0.002     .3521524    1.580884
is_nis_na~35 |   .3487406   .2420996     1.44   0.150    -.1259503    .8234315
is_nis_na~36 |    .339047    .150606     2.25   0.024       .04375     .634344
is_nis_na~37 |   1.758151   .7732405     2.27   0.023     .2420383    3.274263
is_nis_na~40 |  (dropped)
is_nis_na~41 |  (dropped)
is_nis_na~45 |   .5363598   .2441511     2.20   0.028     .0576465    1.015073
is_nis_na~50 |  -.0514955   .7757392    -0.07   0.947    -1.572507    1.469516
is_nis_na~51 |   .3169177   .1292914     2.45   0.014     .0634127    .5704226
is_nis_na~52 |   .1143075   .2582579     0.44   0.658    -.3920654    .6206804
is_nis_na~55 |   .2867054   .1442445     1.99   0.047     .0038815    .5695293
is_nis_na~60 |   .1627371   .1633669     1.00   0.319    -.1575807    .4830548
is_nis_na~61 |  (dropped)
is_nis_na~62 |  (dropped)
is_nis_na~63 |   .1572088    .613016     0.26   0.798    -1.044747    1.359165
is_nis_na~64 |   .5281192   .1373612     3.84   0.000     .2587916    .7974468
is_nis_na~65 |  (dropped)
is_nis_na~66 |  (dropped)
is_nis_na~67 |  (dropped)
is_nis_na~70 |  (dropped)
is_nis_na~71 |  (dropped)
is_nis_na~72 |   1.667344   .7317931     2.28   0.023      .232499     3.10219
is_nis_na~73 |   4.069259   .1454995    27.97   0.000     3.783975    4.354544
is_nis_na~74 |     .59829   .3178104     1.88   0.060    -.0248489    1.221429
is_nis_na~80 |  (dropped)
is_nis_na~85 |  (dropped)
is_nis_na~90 |  -.0944297   .1434537    -0.66   0.510     -.375703    .1868436
is_nis_na~91 |  (dropped)
is_nis_na~92 |  (dropped)
is_nis_na~93 |  (dropped)
is_nis_na~99 |  (dropped)
       _cons |  -.0548124   .0745249    -0.74   0.462    -.2009352    .0913104
------------------------------------------------------------------------------

.         outreg2 `firm_var' `inter' `dummies' using Results/table_PROD_DD.xls,ctitle(imports)
>   `instruct' append
Results/table_PROD_DD.tex
Results/table_PROD_DD.xls
dir : seeout

. 
. 
.         local instruct "tex tdec(4) rdec(4) auto(4) bdec (4) symbol($^a$,$^b$,$^c$)  se"

.         local firm_var " r_size r_prod  r_interm_share  r_share_exp_sales  r_share_imp_inter
> m r_value_add_chain r_ext_fin_dep r_share_debts_o_passive r_share_debts_due_after_one r_shar
> e_fin_debt r_share_stock for mne"

.         local inter "i_*"

.         local dummies "  nacenace2_*  is_nis_nace_*"

. 
.         gen peso_exp=log( prod_value+1) if pippo_exp!=.
(101654 missing values generated)

.         gen peso_imp=log( prod_value+1) if pippo_imp!=.
(100163 missing values generated)

. 
.         xi: regress  ratio_exp crisis `firm_var' `inter' `dummies' [pweight=(peso_exp)], clu
> ster(vat)
(sum of wgt is   7.9025e+04)

Linear regression                                      Number of obs =    5012
                                                       F( 90,  2634) =       .
                                                       Prob > F      =       .
                                                       R-squared     =  0.0246
                                                       Root MSE      =  .85144

                                 (Std. Err. adjusted for 2635 clusters in vat)
------------------------------------------------------------------------------
             |               Robust
   ratio_exp |      Coef.   Std. Err.      t    P>|t|     [95% Conf. Interval]
-------------+----------------------------------------------------------------
      crisis |   -.192831   .1934275    -1.00   0.319    -.5721162    .1864542
      r_size |  -.0655698   .0583526    -1.12   0.261    -.1799913    .0488517
      r_prod |  -.0273134   .0402617    -0.68   0.498    -.1062611    .0516343
r_interm_s~e |   .0647544   .0337529     1.92   0.055    -.0014304    .1309393
r_share_ex~s |  -.1077242   .0407195    -2.65   0.008    -.1875697   -.0278787
r_share_im~m |   .0361234   .0356279     1.01   0.311    -.0337382     .105985
r_value_ad~n |  -.0991227   .0455444    -2.18   0.030    -.1884292   -.0098162
r_ext_fin_~p |  -.0296202   .0387291    -0.76   0.444    -.1055628    .0463223
r_share_d~ve |  -.0330409   .0359043    -0.92   0.358    -.1034444    .0373626
r_share_d~ne |   .0164492   .0362563     0.45   0.650    -.0546446    .0875429
r_share_fi~t |  -.0150215   .0373942    -0.40   0.688    -.0883464    .0583033
r_share_st~k |   .0220108   .0337435     0.65   0.514    -.0441557    .0881772
         for |   .0353319    .039017     0.91   0.365    -.0411752     .111839
         mne |   .0234096   .0354113     0.66   0.509    -.0460272    .0928464
    i_r_size |   .2208557   .0850188     2.60   0.009     .0541453    .3875662
    i_r_prod |    .044286   .0584936     0.76   0.449     -.070412     .158984
i_r_interm~e |  -.0304553   .0521854    -0.58   0.560    -.1327839    .0718732
i_r_share_~s |    .095114   .0662712     1.44   0.151     -.034835    .2250629
i_r_share_~m |   .0168713   .0588864     0.29   0.775     -.098597    .1323396
i_r_value_~n |   -.055274   .0724282    -0.76   0.445     -.197296    .0867479
i_r_ext_fi~p |  -.0437941   .0577063    -0.76   0.448    -.1569484    .0693602
i_r_share~ve |   .0389223   .0561351     0.69   0.488    -.0711511    .1489958
i_r_share~ne |   .0594041   .0566981     1.05   0.295    -.0517732    .1705815
i_r_share_~t |   .0045327   .0583506     0.08   0.938     -.109885    .1189503
i_r_share_~k |   .0118653    .054935     0.22   0.829    -.0958547    .1195854
       i_for |   .0077249   .0577448     0.13   0.894    -.1055049    .1209547
       i_mne |  -.1154316   .0636683    -1.81   0.070    -.2402764    .0094133
 nacenace2_2 |   1.926533   .1058775    18.20   0.000     1.718922    2.134145
 nacenace2_5 |  (dropped)
nacenace2_11 |  (dropped)
nacenace2_14 |   .0151974   .0972322     0.16   0.876    -.1754619    .2058567
nacenace2_15 |   .0940031   .0967505     0.97   0.331    -.0957116    .2837178
nacenace2_16 |   .1201932   .1115311     1.08   0.281    -.0985042    .3388905
nacenace2_17 |   .0433309   .0970445     0.45   0.655    -.1469604    .2336221
nacenace2_18 |   .6320055   .2735836     2.31   0.021     .0955451    1.168466
nacenace2_19 |   .0502712   .1134259     0.44   0.658    -.1721417    .2726841
nacenace2_20 |   .1699852   .1408676     1.21   0.228    -.1062371    .4462075
nacenace2_21 |   .0533626   .0931213     0.57   0.567    -.1292357     .235961
nacenace2_22 |   .0123611     .14343     0.09   0.931    -.2688858    .2936081
nacenace2_23 |   .1689943   .1440734     1.17   0.241    -.1135142    .4515027
nacenace2_24 |   .0638053   .0959144     0.67   0.506    -.1242699    .2518804
nacenace2_25 |   .1512102   .1107781     1.36   0.172    -.0660108    .3684311
nacenace2_26 |   .0965946   .1335189     0.72   0.469     -.165218    .3584073
nacenace2_27 |     .12347   .1133894     1.09   0.276    -.0988714    .3458113
nacenace2_28 |   .0825057   .1101581     0.75   0.454    -.1334995     .298511
nacenace2_29 |   .0168681   .1244733     0.14   0.892    -.2272072    .2609434
nacenace2_30 |  -.0991425   .1943161    -0.51   0.610    -.4801702    .2818852
nacenace2_31 |   .0854071   .1387121     0.62   0.538    -.1865887    .3574029
nacenace2_32 |   .0045872   .1193341     0.04   0.969    -.2294109    .2385853
nacenace2_33 |   .2225362   .1439331     1.55   0.122    -.0596971    .5047695
nacenace2_35 |   .0183902   .1809296     0.10   0.919    -.3363884    .3731687
nacenace2_36 |   .1529276   .1273022     1.20   0.230    -.0966948    .4025501
nacenace2_37 |   .1140387   .0923525     1.23   0.217    -.0670522    .2951295
nacenace2_40 |  (dropped)
nacenace2_41 |  (dropped)
nacenace2_45 |   -.035944   .1706101    -0.21   0.833    -.3704874    .2985994
nacenace2_50 |  -.1177799   .2222875    -0.53   0.596    -.5536556    .3180959
nacenace2_51 |   .2075454   .0997626     2.08   0.038     .0119244    .4031663
nacenace2_52 |   .0128411   .1841735     0.07   0.944    -.3482982    .3739804
nacenace2_55 |   .2425481   .1023055     2.37   0.018     .0419408    .4431554
nacenace2_60 |  -.1067648   .3497364    -0.31   0.760    -.7925508    .5790211
nacenace2_61 |  (dropped)
nacenace2_62 |  (dropped)
nacenace2_63 |  -1.645099   1.313976    -1.25   0.211    -4.221629    .9314312
nacenace2_64 |    .341387   .1239314     2.75   0.006     .0983741    .5843998
nacenace2_65 |  (dropped)
nacenace2_66 |  (dropped)
nacenace2_67 |  (dropped)
nacenace2_70 |  (dropped)
nacenace2_71 |  (dropped)
nacenace2_72 |   .8118695   .7956874     1.02   0.308    -.7483661    2.372105
nacenace2_73 |  -.4536608   .1046908    -4.33   0.000    -.6589453   -.2483762
nacenace2_74 |   .1650748   .1478514     1.12   0.264    -.1248419    .4549914
nacenace2_80 |  (dropped)
nacenace2_85 |  (dropped)
nacenace2_90 |  (dropped)
nacenace2_91 |  (dropped)
nacenace2_92 |  (dropped)
nacenace2_93 |  (dropped)
nacenace2_99 |  (dropped)
 nacenace2_1 |  -.0654367   .1548094    -0.42   0.673     -.368997    .2381237
is_nis_na~_1 |  -.1973244   .2142349    -0.92   0.357    -.6174101    .2227613
is_nis_na~_2 |  -1.366245   .1774794    -7.70   0.000    -1.714258   -1.018232
is_nis_na~_5 |  (dropped)
is_nis_na~11 |  (dropped)
is_nis_na~14 |  -.0840132   .1836803    -0.46   0.647    -.4441854     .276159
is_nis_na~15 |  -.0850617   .1650504    -0.52   0.606    -.4087034    .2385799
is_nis_na~16 |   .0365679   .1974162     0.19   0.853    -.3505386    .4236745
is_nis_na~17 |   -.067321   .1645826    -0.41   0.683    -.3900452    .2554032
is_nis_na~18 |  -.4421358   .3750422    -1.18   0.239    -1.177543    .2932713
is_nis_na~19 |   .1370589   .2254892     0.61   0.543     -.305095    .5792128
is_nis_na~20 |  -.3091859   .2120712    -1.46   0.145     -.725029    .1066571
is_nis_na~21 |  -.0384274   .1786408    -0.22   0.830    -.3887179    .3118631
is_nis_na~22 |  -.1554005   .2332431    -0.67   0.505    -.6127588    .3019577
is_nis_na~23 |  -.3001255   .2339076    -1.28   0.200    -.7587867    .1585357
is_nis_na~24 |   .0007558   .1577296     0.00   0.996    -.3085307    .3100424
is_nis_na~25 |  -.0833285   .1744871    -0.48   0.633    -.4254741    .2588172
is_nis_na~26 |  -.1513757   .1889201    -0.80   0.423    -.5218225    .2190712
is_nis_na~27 |  -.1164025   .1902915    -0.61   0.541    -.4895385    .2567335
is_nis_na~28 |  -.1022841   .1927503    -0.53   0.596    -.4802413    .2756732
is_nis_na~29 |    .045048   .2033058     0.22   0.825    -.3536072    .4437031
is_nis_na~30 |  -.2201402   .2970009    -0.74   0.459    -.8025189    .3622386
is_nis_na~31 |  -.1919026   .2198923    -0.87   0.383    -.6230817    .2392766
is_nis_na~32 |   .5577736   .4095387     1.36   0.173    -.2452764    1.360824
is_nis_na~33 |   -.556824   .2774218    -2.01   0.045    -1.100811   -.0128373
is_nis_na~35 |    .176386   .2979914     0.59   0.554    -.4079348    .7607069
is_nis_na~36 |  -.1175574   .1971357    -0.60   0.551     -.504114    .2689991
is_nis_na~37 |  -.3568312   .2424216    -1.47   0.141    -.8321872    .1185248
is_nis_na~40 |  (dropped)
is_nis_na~41 |  (dropped)
is_nis_na~45 |  -.0673421   .2605817    -0.26   0.796    -.5783076    .4436234
is_nis_na~50 |   .3353447   .2863968     1.17   0.242    -.2262408    .8969302
is_nis_na~51 |  -.2286598   .1720618    -1.33   0.184    -.5660498    .1087303
is_nis_na~52 |   .1447072   .3456194     0.42   0.675    -.5330058    .8224202
is_nis_na~55 |  -.1888617   .3306539    -0.57   0.568    -.8372293    .4595059
is_nis_na~60 |   .2481836    .333682     0.74   0.457    -.4061217    .9024889
is_nis_na~61 |  (dropped)
is_nis_na~62 |  (dropped)
is_nis_na~63 |   1.586607   1.321922     1.20   0.230    -1.005503    4.178717
is_nis_na~64 |  -.4585724   .1972489    -2.32   0.020    -.8453508   -.0717939
is_nis_na~65 |  (dropped)
is_nis_na~66 |  (dropped)
is_nis_na~67 |  (dropped)
is_nis_na~70 |  (dropped)
is_nis_na~71 |  (dropped)
is_nis_na~72 |  -1.456729   1.606326    -0.91   0.365    -4.606519     1.69306
is_nis_na~73 |   .6854301   .1716857     3.99   0.000     .3487776    1.022083
is_nis_na~74 |  -.0272281    .257778    -0.11   0.916    -.5326959    .4782397
is_nis_na~80 |  (dropped)
is_nis_na~85 |  (dropped)
is_nis_na~90 |  (dropped)
is_nis_na~91 |  (dropped)
is_nis_na~92 |  (dropped)
is_nis_na~93 |  (dropped)
is_nis_na~99 |  (dropped)
       _cons |   .0741356   .1270053     0.58   0.559    -.1749047     .323176
------------------------------------------------------------------------------

.         outreg2 `firm_var' `inter' `dummies' using Results/table_PROD_DD.xls,ctitle(exports 
> WLS)  `instruct' append
Results/table_PROD_DD.tex
Results/table_PROD_DD.xls
dir : seeout

.         xi: regress  ratio_imp crisis `firm_var' `inter' `dummies' [pweight=(peso_imp)], clu
> ster(vat)
(sum of wgt is   9.2858e+04)

Linear regression                                      Number of obs =    5939
                                                       F( 92,  3117) =       .
                                                       Prob > F      =       .
                                                       R-squared     =  0.0325
                                                       Root MSE      =  .76517

                                 (Std. Err. adjusted for 3118 clusters in vat)
------------------------------------------------------------------------------
             |               Robust
   ratio_imp |      Coef.   Std. Err.      t    P>|t|     [95% Conf. Interval]
-------------+----------------------------------------------------------------
      crisis |  -.1530857   .1434037    -1.07   0.286     -.434261    .1280896
      r_size |   .1541596   .0480426     3.21   0.001     .0599612     .248358
      r_prod |   .0277045   .0305569     0.91   0.365    -.0322092    .0876181
r_interm_s~e |  -.0574099   .0276272    -2.08   0.038    -.1115793   -.0032405
r_share_ex~s |   .0295859   .0399929     0.74   0.459    -.0488291    .1080009
r_share_im~m |   .0269763    .025527     1.06   0.291    -.0230751    .0770278
r_value_ad~n |   .0191511   .0442689     0.43   0.665    -.0676481    .1059502
r_ext_fin_~p |   .0255541   .0299078     0.85   0.393     -.033087    .0841951
r_share_d~ve |  -.0176476   .0295228    -0.60   0.550    -.0755338    .0402385
r_share_d~ne |   .0460282   .0321443     1.43   0.152    -.0169978    .1090543
r_share_fi~t |  -.0251649   .0316136    -0.80   0.426    -.0871504    .0368207
r_share_st~k |  -.0404862   .0277091    -1.46   0.144    -.0948162    .0138437
         for |   -.043397    .033034    -1.31   0.189    -.1081676    .0213736
         mne |   .0000517   .0296545     0.00   0.999    -.0580927    .0581961
    i_r_size |   -.199556   .0769312    -2.59   0.010    -.3503969    -.048715
    i_r_prod |  -.0107267   .0469639    -0.23   0.819      -.10281    .0813566
i_r_interm~e |   .0762987   .0431367     1.77   0.077    -.0082806    .1608779
i_r_share_~s |  -.0036992   .0631183    -0.06   0.953    -.1274568    .1200584
i_r_share_~m |  -.0831314   .0425836    -1.95   0.051    -.1666263    .0003634
i_r_value_~n |  -.0196646    .066839    -0.29   0.769    -.1507175    .1113883
i_r_ext_fi~p |  -.0598199   .0455836    -1.31   0.190    -.1491968    .0295571
i_r_share~ve |  -.0437639   .0466076    -0.94   0.348    -.1351487    .0476208
i_r_share~ne |  -.0283766   .0490721    -0.58   0.563    -.1245935    .0678403
i_r_share_~t |    .034893   .0503118     0.69   0.488    -.0637545    .1335406
i_r_share_~k |    .041763   .0429766     0.97   0.331    -.0425024    .1260284
       i_for |   .1096215   .0543182     2.02   0.044     .0031184    .2161247
       i_mne |  -.0468446   .0538599    -0.87   0.385     -.152449    .0587598
 nacenace2_2 |   2.210167   .0644564    34.29   0.000     2.083786    2.336548
 nacenace2_5 |  (dropped)
nacenace2_11 |  (dropped)
nacenace2_14 |   .1495365   .2310374     0.65   0.518    -.3034644    .6025374
nacenace2_15 |  -.0846147   .0617047    -1.37   0.170    -.2056007    .0363713
nacenace2_16 |  -.1483398   .1517688    -0.98   0.328    -.4459168    .1492373
nacenace2_17 |  -.1304935   .0793698    -1.64   0.100    -.2861159    .0251289
nacenace2_18 |   .0693432   .1554037     0.45   0.655    -.2353607    .3740471
nacenace2_19 |  -.2993886   .1077271    -2.78   0.005    -.5106119   -.0881653
nacenace2_20 |  -.1118523   .0717251    -1.56   0.119    -.2524855    .0287809
nacenace2_21 |  -.0572167   .0690853    -0.83   0.408     -.192674    .0782406
nacenace2_22 |  -.1120667   .1077126    -1.04   0.298    -.3232615    .0991281
nacenace2_23 |   .1710124   .0734723     2.33   0.020     .0269534    .3150714
nacenace2_24 |  -.0795323   .0654968    -1.21   0.225    -.2079535    .0488888
nacenace2_25 |  -.1108774   .0651907    -1.70   0.089    -.2386985    .0169436
nacenace2_26 |  -.0910513   .0682479    -1.33   0.182    -.2248667     .042764
nacenace2_27 |  -.0842249   .0779512    -1.08   0.280    -.2370658    .0686159
nacenace2_28 |  -.1898265   .0670376    -2.83   0.005     -.321269   -.0583841
nacenace2_29 |  -.1605208   .0778411    -2.06   0.039    -.3131458   -.0078957
nacenace2_30 |  -.1592722   .1784017    -0.89   0.372     -.509069    .1905246
nacenace2_31 |    -.09778   .1000647    -0.98   0.329    -.2939793    .0984193
nacenace2_32 |  -.2875647   .0906017    -3.17   0.002    -.4652097   -.1099198
nacenace2_33 |  -.3409308   .1573118    -2.17   0.030     -.649376   -.0324857
nacenace2_35 |  -.1491935   .1395381    -1.07   0.285    -.4227894    .1244025
nacenace2_36 |  -.1968833   .0854114    -2.31   0.021    -.3643515   -.0294151
nacenace2_37 |  -.6738346   .3358997    -2.01   0.045    -1.332442   -.0152275
nacenace2_40 |  (dropped)
nacenace2_41 |  (dropped)
nacenace2_45 |   -.285595   .1490552    -1.92   0.055    -.5778513    .0066612
nacenace2_50 |   .4302016   .7054735     0.61   0.542    -.9530381    1.813441
nacenace2_51 |  -.1629851   .0697101    -2.34   0.019    -.2996675   -.0263027
nacenace2_52 |  -.2097874   .1424606    -1.47   0.141    -.4891134    .0695387
nacenace2_55 |  -.0726655   .1012763    -0.72   0.473    -.2712404    .1259095
nacenace2_60 |  -.3948333   .1397206    -2.83   0.005     -.668787   -.1208796
nacenace2_61 |  (dropped)
nacenace2_62 |  (dropped)
nacenace2_63 |  -.1704663   .0676348    -2.52   0.012    -.3030796   -.0378529
nacenace2_64 |  -.9403003   .0712929   -13.19   0.000    -1.080086   -.8005144
nacenace2_65 |  (dropped)
nacenace2_66 |  (dropped)
nacenace2_67 |  (dropped)
nacenace2_70 |  (dropped)
nacenace2_71 |  (dropped)
nacenace2_72 |   .0339789   .2486683     0.14   0.891    -.4535914    .5215492
nacenace2_73 |  -3.649781   .0725643   -50.30   0.000     -3.79206   -3.507503
nacenace2_74 |  -.3657846   .2055288    -1.78   0.075    -.7687702     .037201
nacenace2_80 |  (dropped)
nacenace2_85 |  (dropped)
nacenace2_90 |  -.1696412   .0718101    -2.36   0.018     -.310441   -.0288414
nacenace2_91 |  (dropped)
nacenace2_92 |  (dropped)
nacenace2_93 |  (dropped)
nacenace2_99 |  (dropped)
 nacenace2_1 |  -.1772336   .2520802    -0.70   0.482    -.6714936    .3170264
is_nis_na~_1 |   .3058398   .3170549     0.96   0.335    -.3158178    .9274973
is_nis_na~_2 |  -1.162052   .1369784    -8.48   0.000    -1.430629   -.8934746
is_nis_na~_5 |  (dropped)
is_nis_na~11 |  (dropped)
is_nis_na~14 |   .1229772   .4275702     0.29   0.774    -.7153705    .9613249
is_nis_na~15 |   .2748776   .1275472     2.16   0.031     .0247925    .5249628
is_nis_na~16 |   .5376455   .2264448     2.37   0.018     .0936495    .9816415
is_nis_na~17 |   .2952259     .15051     1.96   0.050     .0001172    .5903346
is_nis_na~18 |   .5661093   .2471554     2.29   0.022     .0815055    1.050713
is_nis_na~19 |   .5223791   .1633333     3.20   0.001     .2021274    .8426308
is_nis_na~20 |   .2013015   .1503297     1.34   0.181    -.0934538    .4960567
is_nis_na~21 |   .1109967   .1344573     0.83   0.409     -.152637    .3746305
is_nis_na~22 |   .2940446   .1905278     1.54   0.123    -.0795281    .6676173
is_nis_na~23 |  -.0929938   .1467198    -0.63   0.526    -.3806711    .1946834
is_nis_na~24 |    .236059   .1351654     1.75   0.081    -.0289631    .5010812
is_nis_na~25 |   .1806533   .1297481     1.39   0.164     -.073747    .4350536
is_nis_na~26 |    .101236   .1395059     0.73   0.468    -.1722968    .3747687
is_nis_na~27 |   .2846158   .1668862     1.71   0.088    -.0426022    .6118337
is_nis_na~28 |   .2425386   .1339543     1.81   0.070     -.020109    .5051863
is_nis_na~29 |   .3792426    .149333     2.54   0.011     .0864415    .6720437
is_nis_na~30 |   .3412243   .4159086     0.82   0.412    -.4742581    1.156707
is_nis_na~31 |   .3700081    .168104     2.20   0.028     .0404024    .6996139
is_nis_na~32 |   .7663438   .1813772     4.23   0.000     .4107129    1.121975
is_nis_na~33 |   .9211756    .303887     3.03   0.002     .3253368    1.517014
is_nis_na~35 |   .3777371   .2564357     1.47   0.141     -.125063    .8805371
is_nis_na~36 |   .3330199   .1532061     2.17   0.030     .0326247     .633415
is_nis_na~37 |   1.740864   .7546562     2.31   0.021      .261191    3.220538
is_nis_na~40 |  (dropped)
is_nis_na~41 |  (dropped)
is_nis_na~45 |   .5213368   .2414522     2.16   0.031     .0479154    .9947583
is_nis_na~50 |   .0074209   .7535995     0.01   0.992    -1.470181    1.485023
is_nis_na~51 |   .2907281    .133414     2.18   0.029       .02914    .5523162
is_nis_na~52 |   .1029296   .2584855     0.40   0.691    -.4038896    .6097487
is_nis_na~55 |   .2828062   .1485728     1.90   0.057    -.0085042    .5741166
is_nis_na~60 |   .1586461   .1660832     0.96   0.340    -.1669975    .4842897
is_nis_na~61 |  (dropped)
is_nis_na~62 |  (dropped)
is_nis_na~63 |   .1374278   .6109935     0.22   0.822    -1.060563    1.335418
is_nis_na~64 |   .5354773   .1384964     3.87   0.000     .2639239    .8070307
is_nis_na~65 |  (dropped)
is_nis_na~66 |  (dropped)
is_nis_na~67 |  (dropped)
is_nis_na~70 |  (dropped)
is_nis_na~71 |  (dropped)
is_nis_na~72 |   1.648892   .7255517     2.27   0.023     .2262845      3.0715
is_nis_na~73 |   4.044152   .1478896    27.35   0.000     3.754181    4.334123
is_nis_na~74 |   .5977601   .3108123     1.92   0.055    -.0116575    1.207178
is_nis_na~80 |  (dropped)
is_nis_na~85 |  (dropped)
is_nis_na~90 |  -.0828631   .1484942    -0.56   0.577    -.3740195    .2082933
is_nis_na~91 |  (dropped)
is_nis_na~92 |  (dropped)
is_nis_na~93 |  (dropped)
is_nis_na~99 |  (dropped)
       _cons |  -.0480952   .0715248    -0.67   0.501    -.1883357    .0921453
------------------------------------------------------------------------------

.         outreg2 `firm_var' `inter' `dummies' using Results/table_PROD_DD.xls,ctitle(imports 
> WLS)  `instruct' append
Results/table_PROD_DD.tex
Results/table_PROD_DD.xls
dir : seeout

. 
. 
end of do-file

. seeout using "Results/table_PROD_DD.txt"

. seeout using "Results/table_PROD_DD.txt"

. exit, clear
